Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request
fixes #395
This pull request introduces a new feature to bypass the GitHub API rate limit waiting loops and includes several related changes across multiple files. The key changes involve updating the configuration with a bypass, modifying the rate limit handling logic, and adding corresponding tests.
Proposed Changes
New Feature: Rate Limit Bypass
Configuration Updates:
config.py
: Addedrate_limit_bypass
parameter to theEnvVars
class and updated the__init__
and__repr__
methods to include this parameter. Also, modified theget_env_vars
function to read theRATE_LIMIT_BYPASS
environment variable. [1] [2] [3] [4] [5] [6]Main Functionality Updates:
issue_metrics.py
: Updated thesearch_issues
function to accept arate_limit_bypass
parameter and modified thewait_for_api_refresh
function to skip waiting if the bypass is enabled. Also, updated themain
function to pass therate_limit_bypass
parameter tosearch_issues
. [1] [2] [3] [4] [5] [6]Documentation:
README.md
: Added a description for the newRATE_LIMIT_BYPASS
environment variable.Test Cases:
test_config.py
: Updated thesetUp
method to includeRATE_LIMIT_BYPASS
and added it to the environment variables. Modified thetest_get_env_vars_with_github_app
test case to include therate_limit_bypass
parameter. [1] [2] [3]test_issue_metrics.py
: Added a new test casetest_search_issues_with_just_owner_or_org_with_bypass
to verify that the rate limit bypass works correctly.Readiness Checklist
Author/Contributor
make lint
and fix any issues that you have introducedmake test
and ensure you have test coverage for the lines you are introducing@jeffrey-luszcz
Reviewer
fix
,documentation
,enhancement
,infrastructure
,maintenance
, orbreaking